import instance from '../utils/request'


/*获取用户列表*/
export function getConList(current,size,audit,queryMap,) {
  return instance({
    url: '/con/getConList',
    method: 'POST',
    params:{
      current,
      size,
      audit
    },
    data: queryMap
  })
}

/**
 *
  添加合同
 */
export function add(addForm) {
  return instance({
    url: '/con/add',
    method: 'POST',
    data: addForm
  })
}

export function getDetail(id,pageNum,pageSize,categorys,name) {
  return instance({
    url: '/con/getDetail',
    method: 'GET',
    params:{
      id,
      pageNum,
      pageSize,
      categorys,
      name
    }
  })
}

export function getConById(id) {
  return instance({
    url: '/con/getConById',
    method: 'GET',
    params:{
      id
    }
  })
}

export function upload(id,file) {
  return instance({
    url: '/con/upload',
    method: 'POST',
    params:{
      id,file
    },
  })
}

/**
 *合同审核
 */
export function getApprove(id) {
  return instance({
    url: '/con/getApprove',
    method: 'GET',
    params:{
      id
    }
  })
}

